package tech.yunjing.train.dao;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import tech.yunjing.train.entity.AccountDetail;

import java.util.List;

/**
 * 账户明细管理接口
 * Created by ZhangFan on 2017/6/8.
 */
@Repository
@Mapper
public interface AccountDetailDao {
    /**
     * 增加账户明细
     *
     * @param accountDetail
     * @return AccountDetail账户明细对象
     */
    int addAccountDetail(AccountDetail accountDetail);

    /**
     * 根据账户名查询账户明细
     *
     * @param accountName 账户名
     * @return List<AccountDetail> 账户的所有明细
     */
    List<AccountDetail> getAccountDetailsByAccountName(String accountName);

    /**
     *根据账户id查询账户明细
     * @param accountId 账户Id
     * @return List<AccountDetail> 账户的所有明细
     */
    List<AccountDetail> getAccountDetailsByAccountId(Integer accountId);
}
